package routers

import (
	controllers "beego-admin/controllers/admin"
	index "beego-admin/controllers/index"
	"github.com/astaxie/beego"
)

func init() {
	//首页
	beego.Router("/admin", &controllers.MainController{},"get:Index")
	beego.Router("/admin/index", &controllers.MainController{},"get:Home")

	//菜单
	beego.Router("/admin/ajax_menu", &controllers.MenuController{},"get:AjaxGetMenu")
	beego.Router("/admin/menu_list", &controllers.MenuController{},"get:MenuList")
	beego.Router("/admin/get_tree_menu_list", &controllers.MenuController{},"get:GetTreeMenuList")
	beego.Router("/admin/get_menu_list", &controllers.MenuController{},"get:GetAllMenuList")

	//登录
	beego.Router("/admin/login", &controllers.LoginController{},"get:Index")
	beego.Router("/admin/ajax_login", &controllers.LoginController{},"post:Login")
	beego.Router("/admin/login_out", &controllers.LoginController{},"get:LoginOut")

	//管理员
	beego.Router("/admin/admin_user", &controllers.AdminUserController{},"get:Index")
	beego.Router("/admin/get_admin_user_list", &controllers.AdminUserController{},"get:AjaxGetList")
	beego.Router("/admin/admin_user_add", &controllers.AdminUserController{},"get:Add")
	beego.Router("/admin/ajax_admin_user_add", &controllers.AdminUserController{},"post:AjaxAdd")
	beego.Router("/admin/admin_user_edit", &controllers.AdminUserController{},"get:Edit")
	beego.Router("/admin/ajax_admin_user_edit", &controllers.AdminUserController{},"post:AjaxEdit")
	beego.Router("/admin/ajax_admin_user_delete", &controllers.AdminUserController{},"post:AjaxDelete")

	//角色 权限
	beego.Router("/admin/role_list", &controllers.RoleController{},"get:Index")
	beego.Router("/admin/get_role_list", &controllers.RoleController{},"get:AjaxGetRoleList")
	beego.Router("/admin/role_add", &controllers.RoleController{},"get:Add")
	beego.Router("/admin/role_edit", &controllers.RoleController{},"get:Edit")
	beego.Router("/admin/ajax_role_add", &controllers.RoleController{},"post:AjaxAdd")
	beego.Router("/admin/ajax_role_edit", &controllers.RoleController{},"post:AjaxEdit")
	beego.Router("/admin/ajax_role_delete", &controllers.RoleController{},"post:AjaxDelete")

	//图片上传
	beego.Router("/admin/image_list", &controllers.UploadImageController{},"get:Index")
	beego.Router("/admin/upload_image", &controllers.UploadImageController{},"get:UploadImage")
	beego.Router("/admin/ajax_upload_image", &controllers.UploadImageController{},"post:AjaxUploadImage")
	beego.Router("/admin/ajax_add_image", &controllers.UploadImageController{},"post:AjaxAddImage")
	beego.Router("/admin/get_image_list", &controllers.UploadImageController{},"get:GetImageList")
	beego.Router("/admin/ajax_image_delete", &controllers.UploadImageController{},"post:AjaxImageDelete")
	beego.Router("/admin/ajax_image_delete_more", &controllers.UploadImageController{},"post:AjaxImageDeleteMore")

	//轮播图
	beego.Router("/admin/carousel_list", &controllers.CarouselController{},"get:Index")
	beego.Router("/admin/get_carousel_list", &controllers.CarouselController{},"get:GetCarouselList")
	beego.Router("/admin/upload_carousel", &controllers.CarouselController{},"get:UploadCarousel")
	beego.Router("/admin/carousel_edit", &controllers.CarouselController{},"get:EditCarousel")
	beego.Router("/admin/ajax_upload_carousel", &controllers.CarouselController{},"post:AjaxUploadCarousel")
	beego.Router("/admin/ajax_add_carousel", &controllers.CarouselController{},"post:AjaxAddCarousel")
	beego.Router("/admin/ajax_edit_carousel", &controllers.CarouselController{},"post:AjaxEditCarousel")
	beego.Router("/admin/ajax_carousel_delete", &controllers.CarouselController{},"post:AjaxDeleteCarousel")

	//文章目录
	beego.Router("/admin/article_cat_list", &controllers.ArticleCatController{},"get:Index")
	beego.Router("/admin/get_article_cat_list", &controllers.ArticleCatController{},"get:GetArticleCatList")
	beego.Router("/admin/article_cat_add", &controllers.ArticleCatController{},"get:ArticleCatAdd")
	beego.Router("/admin/ajax_add_article_cat", &controllers.ArticleCatController{},"post:AjaxAddArticleCat")
	beego.Router("/admin/article_cat_edit", &controllers.ArticleCatController{},"get:ArticleCatEdit")
	beego.Router("/admin/ajax_edit_article_cat", &controllers.ArticleCatController{},"post:AjaxEditArticleCat")
	beego.Router("/admin/ajax_delete_article_cat", &controllers.ArticleCatController{},"post:AjaxDeleteArticleCat")

	//文章标签
	beego.Router("/admin/article_tags_list", &controllers.ArticleTagsController{},"get:Index")
	beego.Router("/admin/get_article_tags_list", &controllers.ArticleTagsController{},"get:GetArticleTagsList")
	beego.Router("/admin/article_tags_add", &controllers.ArticleTagsController{},"get:ArticleTagsAdd")
	beego.Router("/admin/ajax_add_article_tags", &controllers.ArticleTagsController{},"post:AjaxAddArticleTags")
	beego.Router("/admin/article_tags_edit", &controllers.ArticleTagsController{},"get:ArticleTagsEdit")
	beego.Router("/admin/ajax_edit_article_tags", &controllers.ArticleTagsController{},"post:AjaxEditArticleTags")
	beego.Router("/admin/ajax_delete_article_tags", &controllers.ArticleTagsController{},"post:AjaxDeleteArticleTags")

	//文章
	beego.Router("/admin/article_list", &controllers.ArticleController{},"get:Index")
	beego.Router("/admin/get_article_list", &controllers.ArticleController{},"get:GetArticleList")
	beego.Router("/admin/article_add", &controllers.ArticleController{},"get:ArticleAdd")
	beego.Router("/admin/ajax_add_article", &controllers.ArticleController{},"post:AjaxAddArticle")
	beego.Router("/admin/article_edit", &controllers.ArticleController{},"get:ArticleEdit")
	beego.Router("/admin/ajax_edit_article", &controllers.ArticleController{},"post:AjaxEditArticle")
	beego.Router("/admin/ajax_delete_article", &controllers.ArticleController{},"post:AjaxDeleteArticle")

	//网站
	beego.Router("/", &index.MainController{},"get:Index")
	beego.Router("/article", &index.ArticleController{},"get:Index")
	beego.Router("/article_detail", &index.ArticleController{},"get:ArticleDetail")

}
